#include <iostream>
using namespace std;

struct doubleUp{
	int operator()(int x){
		return x*2;
	}
};

struct halfIt{
	int operator()(int x){
		return (x/2);
	}
};

template<class Func>
void doAndPrint(int value, Func f){
	cout << f(value) << endl;
}

int main(){
	doAndPrint(10, doubleUp());
	doAndPrint(10, halfIt());
}
